package com.liuyu.common.framework.queue.service.facade;


import com.liuyu.common.framework.queue.model.QueueMessageWrapper;

import java.util.List;

/**
 * @ClassName QueueMessageService

 * @Author: liuyu
 * @Date: Created in 2021/8/17 10:41
 * @Version: 1
 * @Modified By:
 */
public interface QueueMessageService {
    /**
     * 保存失败的消息
     * @author liuyu
     * @date 2021/8/17 10:45
     * @param queueMessageWrapper    包装类
     * @param exception 异常
     * @return boolean
     */
    <T, V> boolean saveFailMessage(QueueMessageWrapper<T> queueMessageWrapper, Exception exception);

    /**
     * 处理消息队列中的消息
     * @author liuyu
     * @date 2021/8/17 11:20
     * @param queueMessageWrapper
     * @return void
     */
    <T> void processQueueMessage(QueueMessageWrapper<T> queueMessageWrapper);

//    /**
//     * 获取消息队列中的重试数据
//     * @author liuyu
//     * @date 2021/8/17 15:20
//     * @param limit
//     * @return java.util.List<com.liuyu.common.framework.mybatis.hmb.po.QueueMessageDO>
//     */
//    List<QueueMessageDO> listQueueMessage(Integer limit);
}
